package com.edu.utils;

import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
import android.app.AlertDialog.Builder;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.TextView;

public class Profiles2Activity extends Activity {
    /** Called when the activity is first created. */
	ListView listView;
	LinearLayout softLayout;
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        listView=(ListView) findViewById(R.id.list);
        softLayout=(LinearLayout) findViewById(R.id.soft);
        softLayout.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				System.out.println(">>>>>>>>>>>>>>>>");
				
//				LayoutInflater factory=LayoutInflater.from(Profiles2Activity.this);
//				View buttonView=factory.inflate(R.layout.dialog, null);
//				
//				Button button=(Button) buttonView.findViewById(R.id.run);
//				Button button2=(Button) buttonView.findViewById(R.id.setting);
//				
//				button.setOnClickListener(new OnClickListener() {
//					
//					@Override
//					public void onClick(View v) {
//						// TODO Auto-generated method stub
//						System.out.println("an>>>>>>>>1111111111");
//					}
//				});
//				
//				button2.setOnClickListener(new OnClickListener() {
//					
//					@Override
//					public void onClick(View v) {
//						// TODO Auto-generated method stub
//						System.out.println("an>>>>>>>>22222");
//					}
//				});
//				Dialog dialog=new  AlertDialog.Builder(Profiles2Activity.this)
//				                 .setIcon(android.R.drawable.title_bar)
//				                 .setTitle("sss")
//				                 .setView(buttonView)
//				                 .create();
//				dialog.show();
				
			
				
				
			}
		});
        MyListAdpter myListAdpter=new MyListAdpter(this);
        listView.setAdapter(myListAdpter);
      }
	@Override
	protected void onResume() {
		// TODO Auto-generated method stub
		super.onResume();
		onCreate(null);
	}
    
    
    
}